<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: red;
            animation-name:move;
            animation-duration:3s;
            /* animation-delay: 3s; */
            /* animation-iteration-count: infinite; *//*动画无限循环*/
            /* animation-direction: alternate-reverse; *//*动画是否交替*/
            animation-fill-mode: backwards;/*定义动画开始前后的停留位置*/
        }
        /*1.声明轨迹*/
        /* @keyframes move{
            from{
                margin-left: 0px;
            }
            to{
                margin-left: 500px;
                background-color: blue;
            }
        } */
        @keyframes move{
            0%{
                margin-left: 0px;
                background-color: blue;
            }
            50%{
                background-color:pink ;
            }
            100%{
                margin-left: 500px;
                background-color: orange;
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>